﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Clmp.Data.DBEntity2
{
    public class Transaction : ITransaction
    {
        internal IDbTransaction DbTransaction{ get; set;}

        [ThreadStatic]
        private static TransactionContext _transactionContext;

        internal static TransactionContext GetTransactionContext()
        {
            return _transactionContext;
        }

        #region ITransaction 成员

        public void Commit()
        {
            DbTransaction.Commit();
        }

        public void Rollback()
        {
            DbTransaction.Rollback();
        }

        #endregion

        #region IDisposable 成员

        public void Dispose()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
